package com.gl.marina;
import com.sun.corba.se.impl.orb.ParserTable;

import org.junit.*;
import org.junit.experimental.runners.Enclosed;
import org.mockito.Mockito.*;

import java.util.NoSuchElementException;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doThrow;

import org.junit.runner.RunWith;


@RunWith(Enclosed.class)
public class BinaryTreeTest {
  public  static class Node{
       BinaryTree BT=new BinaryTree();
       BinaryTree.Node theTree =  BT.new Node(0);
       @Before
       public void setUp() {
           theTree.addNode(1);
           theTree.addNode(2);
           theTree.addNode(3);
           theTree.addNode(4);
       }
        @Test
        public void testAddNode() {
            assertTrue(theTree.addNode(1));
            assertTrue(theTree.addNode(10));
        }
        @Test
        public void testSize() {
            assertEquals(4, theTree.size());
        }
        @Test
        public void testLookingFor() {
            assertTrue(theTree.lookingFor(3));
            assertFalse(theTree.lookingFor(9));
        }
  }
}


